<template>
  <el-dialog
    v-loading="loading"
    :visible.sync="dialog"
    :close-on-click-modal="false"
    title="详情"
    width="85%"
    @close="cancel"
  >
    <el-form :model="itemInfo" :inline="true" size="small" label-width="150px">
      <el-form-item label="Store Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.storeNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Province Name:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.provinceName }}</span>
        </div>
      </el-form-item>
      <el-form-item label="City Name:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.cityName }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Location Code:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.locationCode }}</span>
        </div>
      </el-form-item>
      <el-form-item label="DC Traits:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.dcTraits }}</span>
        </div>
      </el-form-item>
      <el-form-item label="FDC Traits:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.fdcTraits }}</span>
        </div>
      </el-form-item>
      <el-form-item label="City Code:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.cityCode }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Province Code:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.provinceCode }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Logistics Trait by DC:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.logisticsTraitByDc }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Store Code:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.storeCode }}</span>
        </div>
      </el-form-item>
      <el-form-item label="JV Whse Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.jvWhseNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="CHC Whse Nbr:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.chcWhseNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="Media Type:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.mediaType }}</span>
        </div>
      </el-form-item>
      <el-form-item label="CRTL TRAIT:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.crtlTrait }}</span>
        </div>
      </el-form-item>
      <el-form-item label="type:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.type }}</span>
        </div>
      </el-form-item>
      <el-form-item label="MODULAR_TRAIT:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.modularTrait }}</span>
        </div>
      </el-form-item>
      <el-form-item label="创建人:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.createdBy }}</span>
        </div>
      </el-form-item>
      <el-form-item label="创建时间:">
        <div style="width: 200px;">
          <span class="filter-item">{{ parseTime(itemInfo.createdTime) }}</span>
        </div>
      </el-form-item>
      <el-form-item label="最后更新人:">
        <div style="width: 200px;">
          <span class="filter-item">{{ itemInfo.updatedBy }}</span>
        </div>
      </el-form-item>
      <el-form-item label="最后更新时间:">
        <div style="width: 200px;">
          <span class="filter-item">{{ parseTime(itemInfo.updatedTime) }}</span>
        </div>
      </el-form-item>
    </el-form>
  </el-dialog>
</template>

<script>
import { parseTime } from '@/utils/index'
export default {
  props: {
    parent: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      dialog: false,
      itemInfo: {},
      loading: false,
      id: ''
    }
  },
  methods: {
    parseTime,
    cancel() {
      this.itemInfo = {}
      this.loading = false
      this.id = ''
      this.parent.toQuery()
    }
  }
}
</script>
<style lang="scss" scoped>
element.style {
  width: 156px;
}
</style>
